Optimal. Leaf size=161 \[ \frac{4 a^2 (6 A+7 B) \text{EllipticF}\left (\frac{1}{2} (c+d x),2\right )}{21 d}+\frac{4 a^2 (3 A+4 B) E\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{5 d}+\frac{2 a^2 (9 A+7 B) \sin (c+d x) \cos ^{\frac{3}{2}}(c+d x)}{35 d}+\frac{4 a^2 (6 A+7 B) \sin (c+d x) \sqrt{\cos (c+d x)}}{21 d}+\frac{2 A \sin (c+d x) \cos ^{\frac{3}{2}}(c+d x) \left (a^2 \cos (c+d x)+a^2\right )}{7 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.362177, antiderivative size = 161, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 8, integrand size = 33, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.242, Rules used = {2954, 2976, 2968, 3023, 2748, 2639, 2635, 2641} \[ \frac{4 a^2 (6 A+7 B) F\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{21 d}+\frac{4 a^2 (3 A+4 B) E\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{5 d}+\frac{2 a^2 (9 A+7 B) \sin (c+d x) \cos ^{\frac{3}{2}}(c+d x)}{35 d}+\frac{4 a^2 (6 A+7 B) \sin (c+d x) \sqrt{\cos (c+d x)}}{21 d}+\frac{2 A \sin (c+d x) \cos ^{\frac{3}{2}}(c+d x) \left (a^2 \cos (c+d x)+a^2\right )}{7 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2954
Rule 2976
Rule 2968
Rule 3023
Rule 2748
Rule 2639
Rule 2635
Rule 2641
Rubi steps
\begin{align*} \int \cos ^{\frac{7}{2}}(c+d x) (a+a \sec (c+d x))^2 (A+B \sec (c+d x)) \, dx &=\int \sqrt{\cos (c+d x)} (a+a \cos (c+d x))^2 (B+A \cos (c+d x)) \, dx\\ &=\frac{2 A \cos ^{\frac{3}{2}}(c+d x) \left (a^2+a^2 \cos (c+d x)\right ) \sin (c+d x)}{7 d}+\frac{2}{7} \int \sqrt{\cos (c+d x)} (a+a \cos (c+d x)) \left (\frac{1}{2} a (3 A+7 B)+\frac{1}{2} a (9 A+7 B) \cos (c+d x)\right ) \, dx\\ &=\frac{2 A \cos ^{\frac{3}{2}}(c+d x) \left (a^2+a^2 \cos (c+d x)\right ) \sin (c+d x)}{7 d}+\frac{2}{7} \int \sqrt{\cos (c+d x)} \left (\frac{1}{2} a^2 (3 A+7 B)+\left (\frac{1}{2} a^2 (3 A+7 B)+\frac{1}{2} a^2 (9 A+7 B)\right ) \cos (c+d x)+\frac{1}{2} a^2 (9 A+7 B) \cos ^2(c+d x)\right ) \, dx\\ &=\frac{2 a^2 (9 A+7 B) \cos ^{\frac{3}{2}}(c+d x) \sin (c+d x)}{35 d}+\frac{2 A \cos ^{\frac{3}{2}}(c+d x) \left (a^2+a^2 \cos (c+d x)\right ) \sin (c+d x)}{7 d}+\frac{4}{35} \int \sqrt{\cos (c+d x)} \left (\frac{7}{2} a^2 (3 A+4 B)+\frac{5}{2} a^2 (6 A+7 B) \cos (c+d x)\right ) \, dx\\ &=\frac{2 a^2 (9 A+7 B) \cos ^{\frac{3}{2}}(c+d x) \sin (c+d x)}{35 d}+\frac{2 A \cos ^{\frac{3}{2}}(c+d x) \left (a^2+a^2 \cos (c+d x)\right ) \sin (c+d x)}{7 d}+\frac{1}{5} \left (2 a^2 (3 A+4 B)\right ) \int \sqrt{\cos (c+d x)} \, dx+\frac{1}{7} \left (2 a^2 (6 A+7 B)\right ) \int \cos ^{\frac{3}{2}}(c+d x) \, dx\\ &=\frac{4 a^2 (3 A+4 B) E\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{5 d}+\frac{4 a^2 (6 A+7 B) \sqrt{\cos (c+d x)} \sin (c+d x)}{21 d}+\frac{2 a^2 (9 A+7 B) \cos ^{\frac{3}{2}}(c+d x) \sin (c+d x)}{35 d}+\frac{2 A \cos ^{\frac{3}{2}}(c+d x) \left (a^2+a^2 \cos (c+d x)\right ) \sin (c+d x)}{7 d}+\frac{1}{21} \left (2 a^2 (6 A+7 B)\right ) \int \frac{1}{\sqrt{\cos (c+d x)}} \, dx\\ &=\frac{4 a^2 (3 A+4 B) E\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{5 d}+\frac{4 a^2 (6 A+7 B) F\left (\left .\frac{1}{2} (c+d x)\right |2\right )}{21 d}+\frac{4 a^2 (6 A+7 B) \sqrt{\cos (c+d x)} \sin (c+d x)}{21 d}+\frac{2 a^2 (9 A+7 B) \cos ^{\frac{3}{2}}(c+d x) \sin (c+d x)}{35 d}+\frac{2 A \cos ^{\frac{3}{2}}(c+d x) \left (a^2+a^2 \cos (c+d x)\right ) \sin (c+d x)}{7 d}\\ \end{align*}
Mathematica [C] time = 6.2486, size = 1040, normalized size = 6.46 \[ \text{result too large to display} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 1.744, size = 385, normalized size = 2.4 \begin{align*} -{\frac{4\,{a}^{2}}{105\,d}\sqrt{ \left ( 2\, \left ( \cos \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}-1 \right ) \left ( \sin \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{2}} \left ( 120\,A\cos \left ( 1/2\,dx+c/2 \right ) \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{8}+ \left ( -348\,A-84\,B \right ) \left ( \sin \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{6}\cos \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) + \left ( 378\,A+224\,B \right ) \left ( \sin \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{4}\cos \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) + \left ( -117\,A-91\,B \right ) \left ( \sin \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{2}\cos \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) +30\,A\sqrt{ \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}}\sqrt{2\, \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}-1}{\it EllipticF} \left ( \cos \left ( 1/2\,dx+c/2 \right ) ,\sqrt{2} \right ) -63\,A\sqrt{ \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}}\sqrt{2\, \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}-1}{\it EllipticE} \left ( \cos \left ( 1/2\,dx+c/2 \right ) ,\sqrt{2} \right ) +35\,B\sqrt{ \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}}\sqrt{2\, \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}-1}{\it EllipticF} \left ( \cos \left ( 1/2\,dx+c/2 \right ) ,\sqrt{2} \right ) -84\,B\sqrt{ \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}}\sqrt{2\, \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}-1}{\it EllipticE} \left ( \cos \left ( 1/2\,dx+c/2 \right ) ,\sqrt{2} \right ) \right ){\frac{1}{\sqrt{-2\, \left ( \sin \left ( 1/2\,dx+c/2 \right ) \right ) ^{4}+ \left ( \sin \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{2}}}} \left ( \sin \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{-1}{\frac{1}{\sqrt{2\, \left ( \cos \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}-1}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left ({\left (B a^{2} \cos \left (d x + c\right )^{3} \sec \left (d x + c\right )^{3} +{\left (A + 2 \, B\right )} a^{2} \cos \left (d x + c\right )^{3} \sec \left (d x + c\right )^{2} +{\left (2 \, A + B\right )} a^{2} \cos \left (d x + c\right )^{3} \sec \left (d x + c\right ) + A a^{2} \cos \left (d x + c\right )^{3}\right )} \sqrt{\cos \left (d x + c\right )}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (B \sec \left (d x + c\right ) + A\right )}{\left (a \sec \left (d x + c\right ) + a\right )}^{2} \cos \left (d x + c\right )^{\frac{7}{2}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]